<include file="Public:header"/>
<style>
input{padding:6px;}
.title{background:#E2E8EB;width:180px;text-align:right;}
</style>

<a href="__URL__/addAdmin"><input type="button" value="添加管理员"></a>
<table border="0" width="100%" align="center" cellspacing="3" cellpadding="3">
	<tr>
		<td width="10%">账号</td>
		<td width="10%">角色</td>
		<td width="10%">最近登录</td>
		<td width="30%">权限</td>
		<td width="10%">修改</td>
		<td width="10%">删除</td>
	</tr>
<volist name="list" id="admin">
	<tr>
		<td>{$admin.uname}</td>
		<td>{$admin.role}</td>
		<td>{$admin.last_time|date="Y/m/d H:i:s",###}</td>
		<td>{$admin.perm}</td>
		<td><if condition="$admin.uname neq 'pangudashu'"><a href="__URL__/updateAdmin/?id={$admin.id}">修改</a></if></td>
		<td><if condition="$admin.uname neq 'pangudashu'"><a href="javascript:;" onclick="delAdmin({$admin.id})">删除</a></if></td>
	</tr>
</volist>
</table>


<div id="save"><input type="button" id="change" value="保存修改" style="padding:2px"></div>

<script>
function delAdmin(t){
	if(confirm('你确定要删除此用户吗')) {
		$.get('__URL__/delAdmin',{id:t},function(res){
			jSuccess("<strong>修改成功！</strong>",{TimeShown : 500,VerticalPosition : 'center',HorizontalPosition : 'center',onClosed:function(){location.reload();}})
		})
	}
}
</script>